/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package edu.upn.sigemfi.gar.be;

import java.io.Serializable;
import javax.persistence.Basic;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.NamedQueries;
import javax.persistence.NamedQuery;
import javax.persistence.Table;

/**
 *
 * @author Freddy
 */
@Entity
@Table(name = "GAR_NOTARIA")
@NamedQueries({
    @NamedQuery(name = "Notaria.findAll", query = "SELECT n FROM Notaria n"),
    @NamedQuery(name = "Notaria.findByIdNotaria", query = "SELECT n FROM Notaria n WHERE n.idNotaria = :idNotaria"), @NamedQuery(name = "Notaria.findByNombre", query = "SELECT n FROM Notaria n WHERE n.nombre = :nombre"), @NamedQuery(name = "Notaria.findByDireccion", query = "SELECT n FROM Notaria n WHERE n.direccion = :direccion"), @NamedQuery(name = "Notaria.findByTelefono", query = "SELECT n FROM Notaria n WHERE n.telefono = :telefono")})
public class Notaria implements Serializable {
    private static final long serialVersionUID = 1L;
    @Id
    @Basic(optional = false)
    @Column(name = "ID_NOTARIA")
    @GeneratedValue(strategy = GenerationType.IDENTITY)
    private Long idNotaria;
    @Basic(optional = false)
    @Column(name = "NOMBRE")
    private String nombre;
    @Basic(optional = false)
    @Column(name = "DIRECCION")
    private String direccion;
    @Basic(optional = false)
    @Column(name = "TELEFONO")
    private String telefono;

    public Notaria() {
    }

    public Notaria(Long idNotaria) {
        this.idNotaria = idNotaria;
    }

    public Notaria(Long idNotaria, String nombre, String direccion, String telefono) {
        this.idNotaria = idNotaria;
        this.nombre = nombre;
        this.direccion = direccion;
        this.telefono = telefono;
    }

    public Long getIdNotaria() {
        return idNotaria;
    }

    public void setIdNotaria(Long idNotaria) {
        this.idNotaria = idNotaria;
    }

    public String getNombre() {
        return nombre;
    }

    public void setNombre(String nombre) {
        this.nombre = nombre;
    }

    public String getDireccion() {
        return direccion;
    }

    public void setDireccion(String direccion) {
        this.direccion = direccion;
    }

    public String getTelefono() {
        return telefono;
    }

    public void setTelefono(String telefono) {
        this.telefono = telefono;
    }

    @Override
    public int hashCode() {
        int hash = 0;
        hash += (idNotaria != null ? idNotaria.hashCode() : 0);
        return hash;
    }

    @Override
    public boolean equals(Object object) {
        // TODO: Warning - this method won't work in the case the id fields are not set
        if (!(object instanceof Notaria)) {
            return false;
        }
        Notaria other = (Notaria) object;
        if ((this.idNotaria == null && other.idNotaria != null) || (this.idNotaria != null && !this.idNotaria.equals(other.idNotaria))) {
            return false;
        }
        return true;
    }

    @Override
    public String toString() {
        return "edu.upn.sigemfi.gar.be.Notaria[idNotaria=" + idNotaria + "]";
    }

}
